package com.pingan.agentbank.aaos.dao;
/**
 * Title:
 * Description:Generate by isql(lianght).
 * @Copyright: Copyright (c) 2008
 * @Company: CORSWORK
 * @author: lianght
 * @version: 1.0.0
 * @time: Tue Dec 18 13:42:21 CST 2018
 * 
 * Create by isql command:
 * file appro_file_v1 com.pa.agentbank.aaos.service.ApproFile
 */

import com.pingan.agentbank.aaos.pojo.ApproFileInfo;
import com.pingan.vframe.db.*;
import com.pingan.vframe.util.JaDateTime;

import java.util.List;

/**
 * Class description:ApproFileDao
 * 
 * @author 
 */
public abstract class ApproFileDao extends EntityDao<ApproFileInfo> {
	@SqlParam(condition="1=1")
	public abstract List<ApproFileInfo> pageApproFileInfos(int offset, int limit);
	
	//-----------------//

	@SqlParam( condition = "state = :state")
	public abstract DBIterator<ApproFileInfo> queryByState(int state);

	@SqlParam(condition = "state = 4 and fileTime <= :time")
	public abstract List<ApproFileInfo> queryOverDue(JaDateTime time);

	@SqlParam(condition = "id = :id",updateSet = "state")
	public abstract int updateStateById(int state,int id);

	@SqlParam(condition = "id = :id",updateSet = "recordNum,state")
	public abstract int updateCountAndStateById(int count,int state,int id);

	@SqlParam(condition = "id = :id",updateSet = "resultFileName,state")
	public abstract int updateResultNameAndStateById(String resultFileName,int state,int id);

	@SqlParam
	public abstract DBIterator<ApproFileInfo> queryAll();

}
